<!DOCTYPE html>
<!-- val 表单元素的 defaultValue 属性 -->

<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
	$(document).ready(function() {

		$("#e-mail").focus(function() {
			var val = $(this).val();
			if (val == this.defaultValue) {
				$(this).val("");
			}
		}).blur(function() {
			var val = this.value;
			if ($.trim(val) == "") {
				this.value = this.defaultValue;
			}
		})
	})
</script>
</head>
<body>
	<from> <input type="text" id="e-mail" value="请输入邮箱地址">
	<p>
		<input type="text" id="e-password" value="请输入邮箱密码">
	<p>
		<input type="button" value="提交">
	</from>

</body>
</html>